package model.dao;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import model.vo.MakindVO;
import model.vo.MasecretVO;
import model.vo.MasecurityVO;
import model.vo.MraassetVO;
import model.vo.MrainfoVO;
import model.vo.MridentyVO;
import model.vo.MsoaVO;
import model.vo.MtkindVO;
import model.vo.MtlistVO;
import model.vo.MvlistVO;
import model.vo.MvscoreVO;
import model.vo.RiskScenarioVO;
import model.vo.StateReportVO;
import model.vo.TbPublicVO;
import model.vo.TdoaVO;
import model.vo.TracontVO;
import model.vo.TraitemInfoVO;
import model.vo.TreriskVO;
import model.vo.TriskplanVO;
import model.vo.TtriskcalcVO;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import util.CommonConstants;

public class RiskIDAOImpl extends SqlMapClientDaoSupport implements RiskIDAO {
	//마감 현황 (count)
	//자산유형목록 페이지로 이동
	public List magam_popup(int pro_id) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.magam_popup", pro_id);
	}
	
	//평가된 카운터 숫자(count)
	@Override
	public int pyungCount(Map map) throws SQLException {
		return (Integer) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.pyungCount",map);
	}
	//[기준수립]
	//(자산유형목록)
	//자산유형목록 페이지로 이동
	public List baseA() throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.baseA");
	}
	//자산유형목록 등록
	@Override
	public void baseA_insert(TbPublicVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.baseA_insert", vo);
	}
	//자산유형목록 삭제
	@Override
	public void baseA_delete(TbPublicVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.baseA_delete", vo);
	}
	//자산유형목록 수정 페이지로 이동
	@Override
	public TbPublicVO baseA_updatePage(String base_lev2cd) throws SQLException {
		return (TbPublicVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.baseA_updatePage", base_lev2cd);
	}
	//자산유형목록 수정
	@Override
	public void baseA_update(TbPublicVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.baseA_update", vo);
	}
	
	
	//(위협목록)
	//위협목록 페이지로 이동
	@Override
	public List baseT(int pro_id) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.baseT", pro_id);
	}
	//위협목록 등록
	@Override
	public void baseT_insert(MtkindVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.baseT_insert", vo);
	}
	//위협목록 삭제
	@Override
	public void baseT_delete(String base_levAll,int pro_id) throws SQLException {
		// TODO Auto-generated method stub
		HashMap map=new HashMap();
		map.put("base_levAll", base_levAll);
		map.put("pro_id", pro_id);
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.baseT_delete", map);
	}
	//위협목록 수정 페이지로 이동
	@Override
	public MtkindVO baseT_updatePage(String base_levAll,int pro_id) throws SQLException {
		HashMap map=new HashMap();
		map.put("base_levAll",base_levAll);
		map.put("pro_id",pro_id);
		return (MtkindVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.baseT_updatePage", map);
	}
	//위협목록 수정
	@Override
	public void baseT_update(MtkindVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.baseT_update", vo);
	}
	
	//(취약성목록)
	//취약성목록 페이지로 이동
	@Override
	public List baseV(int pro_id) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.baseV",pro_id);
	}
	//취약성목록 등록
	@Override
	public void baseV_insert(MvlistVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.baseV_insert", vo);
	}
	//취약성목록 삭제
	@Override
	public void baseV_delete(String ts_cdAll,int pro_id) throws SQLException {
		// TODO Auto-generated method stub
		HashMap map =new HashMap();
		map.put("ts_cdAll",ts_cdAll);
		map.put("pro_id",pro_id);
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.baseV_delete", map);
	}
	//취약성목록 수정 페이지로 이동
	@Override
	public MvlistVO baseV_updatePage(String ts_cdAll,int pro_id) throws SQLException {
		HashMap map =new HashMap();
		map.put("ts_cdAll",ts_cdAll);
		map.put("pro_id",pro_id);
		return (MvlistVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.baseV_updatePage", map);
	}
	//취약성목록 수정
	@Override
	public void baseV_update(MvlistVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.baseV_update", vo);
	}
	
	
	//[자산식별]
	//1.자산기준수립
	//(자산유형분류기준)
	//자산유형분류기준 페이지로 이동
	@Override
	public List makind(int pro_id) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.makind",pro_id);
	}
	//자산유형분류기준 페이지로 이동
	@Override
	public ArrayList<MakindVO> makindMap(int pro_id) throws SQLException {
		return (ArrayList<MakindVO>) super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.makindMap",pro_id);
	}
	//자산유형 생성 팝업 리스트
	@Override
	public List asset_kind(int pro_id) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.asset_kind",pro_id);
	}
	//자산유형 입력 데이터
	@Override
	public MakindVO asset_kindData(String base_lev1) throws SQLException {
		return (MakindVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.asset_kindData", base_lev1);
	}
	//최대 순번 구해오기
	@Override
	public Integer makind_maxNo(int pro_id) throws SQLException {
		return (Integer) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.makind_maxNo",pro_id);
	}
	//자산유형분류기준 등록
	@Override
	public void makind_insert(MakindVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.makind_insert", vo);
	}
	//자산유형분류기준 삭제
	@Override
	public void makind_delete(MakindVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.makind_delete", vo);
	}
	//자산유형분류기준 수정 페이지로 이동
	@Override
	public MakindVO makind_updatePage(MakindVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MakindVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.makind_updatePage", vo);
	}
	//자산유형분류기준 수정
	@Override
	public void makind_update(MakindVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.makind_update", vo);
	}
	
	
	//(자산보안등급평가기준)
	//자산보안등급평가기준 페이지로 이동
	@Override
	public List masecurity(int pro_id) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.masecurity",pro_id);
	}
	//최대 순번 구해오기
	@Override
	public Integer masecurity_maxNo(int pro_id) throws SQLException {
		return (Integer) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.masecurity_maxNo",pro_id);
	}
	//자산보안등급평가기준 등록
	@Override
	public void masecurity_insert(MasecurityVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.masecurity_insert", vo);
	}
	//자산보안등급평가기준 삭제
	@Override
	public void masecurity_delete(MasecurityVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.masecurity_delete", vo);
	}
	//자산보안등급평가기준 수정 페이지로 이동
	@Override
	public MasecurityVO masecurity_updatePage(MasecurityVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MasecurityVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.masecurity_updatePage", vo);
	}
	//자산보안등급평가기준 수정
	@Override
	public void masecurity_update(MasecurityVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.masecurity_update", vo);
	}
	
	
	//(자산기밀등급분류)
	//자산기밀등급분류 페이지로 이동
	@Override
	public List masecret(int pro_id) throws SQLException {
		System.out.println(pro_id);
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.masecret",pro_id);
	}
	//최대 순번 구해오기
	@Override
	public Integer masecret_maxNo(int pro_id) throws SQLException {
		return (Integer) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.masecret_maxNo",pro_id);
	}
	//자산기밀등급분류 등록
	@Override
	public void masecret_insert(MasecretVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.masecret_insert", vo);
	}
	//자산기밀등급분류 삭제
	@Override
	public void masecret_delete(MasecretVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.masecret_delete", vo);
	}
	//자산기밀등급분류 수정 페이지로 이동
	@Override
	public MasecretVO masecret_updatePage(MasecretVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MasecretVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.masecret_updatePage", vo);
	}
	//자산기밀등급분류 수정
	@Override
	public void masecret_update(MasecretVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.masecret_update", vo);
	}
	
	
	
	//2.자산식별및평가
	//(RA정보자산식별)
	//RA정보자산식별 페이지로 이동
	public List mrainfo(Map map) throws SQLException{
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mrainfo",map);
	}
	//RA정보코드 유효성 검사
	@Override
	public boolean searchRainfoId(MrainfoVO vo) throws SQLException {
		boolean flag=false;
		String str=(String) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.searchRainfoId", vo);
		if(str!=null){
			flag=true;
		}
		return flag;
	}
	//RA정보자산식별 등록
	@Override
	public void mrainfo_insert(MrainfoVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.mrainfo_insert", vo);
	}
	//RA정보자산식별 등록(엑셀)
	@Override
	public void mrainfo_insertExcel(Map map) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.mrainfo_insertExcel", map);
	}
	//RA정보자산식별 수정 페이지로 이동
	@Override
	public MrainfoVO mrainfo_updatePage(MrainfoVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MrainfoVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mrainfo_updatePage", vo);
	}
	//RA정보자산식별 수정
	@Override
	public void mrainfo_update(MrainfoVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mrainfo_update", vo);
	}
	//RA정보자산식별 삭제
	@Override
	public void mrainfo_delete(TracontVO vo) throws SQLException{
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.mrainfo_delete", vo);
		//super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.mrainfoCon_delete", vo);
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.tracont1_delete", vo);
	}
	
	
	//컨테이너 리스트
	@Override
	public List tracont_list(int pro_id) throws SQLException{
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.tracont_list",pro_id);
	}
	
	
	
	//컨테이너2(공통테이블) 리스트
	@Override
	public List tracont2_list(int pro_id) throws SQLException{
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.tracont2_list",pro_id);
	}
	//컨테이너1(개별테이블) 리스트
	@Override
	public List tracont1_list(TracontVO vo) throws SQLException{
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.tracont1_list",vo);
	}
	//컨테이너1(개별테이블) 수정테이블 값 
	@Override
	public TracontVO tracont1_listByRacontNm(TracontVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (TracontVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.tracont1_listByRacontNm", vo);
	}
	//공통 컨테이너 사용여부 검사
	@Override
	public boolean searchUseTracont2(TracontVO vo) throws SQLException {
		boolean flag=false;
		String str=(String) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.searchUseTracont2", vo);
		if(str!=null){
			flag=true;
		}
		return flag;
	}
	
	//컨테이너1 등록
	@Override
	public void tracont1_insert(TracontVO vo) throws SQLException{
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.tracont1_insert", vo);
	}
	//컨테이너1 삭제
	@Override
	public void tracont1_delete(TracontVO vo) throws SQLException{
		//System.out.println(vo);
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.tracont1_delete", vo);
	}
	//공통 컨테이너로 넘어간 데이터 컨테이너1에서 삭제
	@Override
	public void tracont1_deleteByRacontNm(TracontVO vo) throws SQLException{
		//System.out.println(vo);
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.tracont1_deleteByRacontNm", vo);
	}
	//컨테이너2 등록
	@Override
	public void tracont2_insert(TracontVO vo) throws SQLException{
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.tracont2_insert", vo);
	}
	//컨테이너2 삭제
	@Override
	public void tracont2_delete(TracontVO vo) throws SQLException{
		//System.out.println(vo);
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.tracont2_delete", vo);
	}
	
	
	//컨테이너 등록(엑셀)
	@Override
	public void tracont_insertExcel(Map map) throws SQLException{
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.tracont_insertExcel", map);
	}
	/*
	//컨테이너 정보 변경
	public List changeCon(TracontVO vo) throws SQLException{
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.changeCon",vo);
	}
	//컨테이너 삭제
	public void mrainfoCon_delete(TracontVO vo) throws SQLException{
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.mrainfoCon_delete", vo);
	}
	
	//컨테이너 등록
	@Override
	public void tracont_insert(TracontVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.tracont_insert", vo);
	}
	//컨테이너 수정
	@Override
	public void tracont_update(TracontVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.tracont_update", vo);
	}
	//컨테이너 등록 테이블 값 확인 및 생성
	@Override
	public TracontVO tracontTable(TracontVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (TracontVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.tracontTable", vo);
	}
	//컨테이너 최대 순번 구해오기
	@Override
	public Integer tracont_maxNo(TracontVO vo) throws SQLException{
		return (Integer) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.tracont_maxNo",vo);
	}
	*/
	
	
	
	//(RA정보자산평가)
	//RA정보자산평가 페이지로 이동
	//public List mrainfop(int pro_id) throws SQLException{
	//	return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mrainfop",pro_id);
	//}
	public List mrainfop(Map map) throws SQLException{
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mrainfop",map);
	}
	//RA정보자산평가 수정 페이지로 이동
	@Override
	public MrainfoVO mrainfop_updatePage(MrainfoVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MrainfoVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mrainfop_updatePage", vo);
	}
	//RA정보자산평가 기밀등급(역순)
	@Override
	public List secretLevel(int pro_id) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.secretLevel",pro_id);
	}
	//RA정보자산평가 수정
	@Override
	public void mrainfop_update(MrainfoVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mrainfop_update", vo);
	}
	
	
	//(RA정보식별)
	//RA정보식별 페이지로 이동
	public List mraasset(Map map) throws SQLException{
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mraasset",map);
	}
	//컨테이너 명칭 및 갯수
	public List distinctRacontNmAndCount(int pro_id) throws SQLException{
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.distinctRacontNmAndCount",pro_id);
	}
	//컨테이너에 매핑되어있는 ra정보들
	public List mappingInfoByRaitemNm(MraassetVO vo) throws SQLException{
		List list=null;
		if(vo.getGub().equals("개별")){
			System.out.println("개별");
			list=super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mappingInfoByRaitemNmCont1",vo);
		}else if(vo.getGub().equals("공통")){
			System.out.println("공통");
			list=super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mappingInfoByRaitemNmCont2",vo);
		}
		return list;
	}
	//총 자산수 : 총 컨테이너 수(distinct)
	@Override
	public Integer totalRacontCount(int pro_id) throws SQLException {
		return (Integer) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.totalRacontCount",pro_id);
	}
	//총 매핑된 자산수
	@Override
	public Integer totalMCount(MraassetVO vo) throws SQLException {
		int totalMCount=0;
		if(vo.getGub().equals("개별")){
			System.out.println("개별");
			totalMCount=(Integer) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.totalMCountCont1",vo);
		}else if(vo.getGub().equals("공통")){
			System.out.println("공통");
			totalMCount=(Integer) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.totalMCountCont2",vo);
		}
		return totalMCount;
	}
	//저장시킬 RA정보
	public MraassetVO mraasset_insertData(MraassetVO vo) throws SQLException{
		MraassetVO mvo=null;
		if(vo.getGub().equals("개별")){
			System.out.println("개별");
			mvo=(MraassetVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mraasset_insertDataCont1",vo);
		}else if(vo.getGub().equals("공통")){
			System.out.println("공통");
			mvo=(MraassetVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mraasset_insertDataCont2",vo);
		}
		return mvo;
	}
	//요구사항
	@Override
	public List mraasset_memoData(MraassetVO vo) throws SQLException {
		List list=null;
		if(vo.getGub().equals("개별")){
			System.out.println("개별");
			list=super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mraasset_memoDataCont1",vo);
		}else if(vo.getGub().equals("공통")){
			System.out.println("공통");
			list=super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mraasset_memoDataCont2",vo);
		}
		return list;
	}
	//연관 정보 갯수 새창열기
	public List mappingInfoByRaitemId(TraitemInfoVO vo) throws SQLException{
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mappingInfoByRaitemId",vo);
	}
	//RA정보식별 수정 페이지로 이동
	@Override
	public MraassetVO mraasset_updatePage(MraassetVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MraassetVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mraasset_updatePage", vo);
	}
	//RA정보식별 수정
	@Override
	public void mraasset_update(MraassetVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mraasset_update", vo);
	}
	//RA정보식별 최대순번 구하기
	@Override
	public String mraasset_maxNo(MraassetVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (String) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mraasset_maxNo",vo);
	}
	
	//ascLevel
	@Override
	public String ascLevel(MraassetVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (String) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.ascLevel",vo);
	}
	//RA정보식별 등록
	@Override
	public void mraasset_insert(MraassetVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.mraasset_insert", vo);
	}
	//RA정보식별 등록(엑셀)
	@Override
	public void mraasset_insertExcel(Map map) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.mraasset_insertExcel", map);
	}
	//traitem_info 등록
	@Override
	public void traitemInfoInsert(TraitemInfoVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.traitemInfoInsert", vo);
	}
	//RA정보식별 삭제
	@Override
	public void mraasset_delete(MraassetVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.mraasset_delete", vo);
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.traitemInfo_delete", vo);
	}
	
	//(RA정보평가)
	//RA정보평가 페이지로 이동
	public List mraassetp(Map map) throws SQLException{
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mraassetp", map);
	}
	//RA정보평가 수정 페이지로 이동
	@Override
	public MraassetVO mraassetp_updatePage(MraassetVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MraassetVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mraassetp_updatePage", vo);
	}
	//RA정보평가 수정
	@Override
	public void mraassetp_update(MraassetVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mraassetp_update", vo);
	}
	
	
	//[위협식별]
	//(분류기준수립)
	//분류기준수립 페이지로 이동
	@Override
	public List mtkind(Map map) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mtkind",map);
	}
	//분류기준수립 페이지로 이동(조회)
	@Override
	public List mtkindSearchBaseLev1(MtkindVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mtkindSearchBaseLev1",vo);
	}
	//mtkind 조회 기준
	@Override
	public List distMtkind(int pro_id) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.distMtkind",pro_id);
	}
	@Override
	public ArrayList<MtkindVO> mtkindArrayList(Map map) throws SQLException {
		return (ArrayList<MtkindVO>) super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mtkindArrayList",map);
	}
	//tbtlomd 조회 기준
	@Override
	public List distTbtkind(int pro_id) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.distTbtkind",pro_id);
	}
	//분류기준수립 데이터(tbtkind)생성 팝업리스트(조회)
	@Override
	public List tbtkindSearchBaseLev1(MtkindVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.tbtkindSearchBaseLev1",vo);
	}
	//분류기준수립 데이터(tbtkind) 생성 팝업 리스트
	@Override
	public List tbtkind_data(int pro_id) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.tbtkind_data",pro_id);
	}
	//최대 순번 구해오기
	@Override
	public Integer mtkind_maxNo(int pro_id) throws SQLException {
		return (Integer) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mtkind_maxNo",pro_id);
	}
	//분류기준수립 등록
	@Override
	public void mtkind_insert(MtkindVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.mtkind_insert", vo);
	}
	//분류기준수립 입력할 데이터 가져오기
	@Override
	public MtkindVO tbtkind_InsertData(MtkindVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MtkindVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.tbtkind_InsertData", vo);
	}
	//분류기준수립 삭제
	@Override
	public void mtkind_delete(MtkindVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.mtkind_delete", vo);
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.mtlist_deleteByTkId", vo); //관계지어서 삭제 시킬것이기 때문에 필요없음 //필요잇는거 같음;?
	}
	//분류기준수립 수정 페이지로 이동
	@Override
	public MtkindVO mtkind_updatePage(MtkindVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MtkindVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mtkind_updatePage", vo);
	}
	//분류기준수립 수정
	@Override
	public void mtkind_update(MtkindVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mtkind_update", vo);
	}

	//위협유형 팝업 새창열기
	//변경(공통 테이블 값 정보 가져오기) 
	//팝업 내용 가져오기
	@Override
	public List tbpublicData(String base_id) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.tbpublicData",base_id);
	}
	//팝업 내용 가져오기
	@Override
	public TbPublicVO tbpublicDataSelectByBaseLev1(Map map) throws SQLException {
		// TODO Auto-generated method stub
		return (TbPublicVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.tbpublicDataSelectByBaseLev1",map);
	}
	//팝업 내용 가져오기(역순)
	@Override
	public List tbpublicDataDesc(String base_id) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.tbpublicDataDesc",base_id);
	}
	
	
	//(위협목록작성)
	//위협목록작성 페이지로 이동
	@Override
	public List mtlist(Map map) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mtlist",map);
	}
	
	//위협목록작성 연관자산 팝업창
	@Override
	public List t_akind_popup(Map map) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.t_akind_popup", map);
	}
	
	//위협목록작성 페이지로 이동(조회)
	@Override
	public List mtlistSearchBaseLev1(Map map) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mtlistSearchBaseLev1", map);
	}
	//mtlist 조회 기준
	@Override
	public List distMtlist(int pro_id) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.distMtlist",pro_id);
	}
	//위협목록작성 등록 새창의 내용
	@Override
	public List openTkList(int pro_id) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.openTkList",pro_id);
	}
	//위협목록작성 등록 새창의 내용 (조회)
	@Override
	public List openTkListSearchBaseLev1(MtkindVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.openTkListSearchBaseLev1",vo);
	}
	//최대 순번 구해오기
	@Override
	public Integer mtlist_maxNo(int pro_id) throws SQLException {
		return (Integer) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mtlist_maxNo",pro_id);
	}
	//위협목록작성 등록
	@Override
	public void mtlist_insert(MtlistVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.mtlist_insert", vo);
	}
	//위협목록작성 삭제
	@Override
	public void mtlist_delete(MtlistVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.mtlist_delete", vo);
	}
	//위협목록작성 수정 페이지로 이동
	@Override
	public MtlistVO mtlist_updatePage(MtlistVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MtlistVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mtlist_updatePage", vo);
	}
	//위협목록작성 수정
	@Override
	public void mtlist_update(MtlistVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mtlist_update", vo);
	}

	
	
	
	
	//[취약성식별]
	//(취약성식별)
	//취약성식별 페이지로 이동
	@Override
	public List mvlist(Map map) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mvlist",map);
	}
	//취약성체크리스트 데이터(tbvkind) 생성 팝업 리스트
	public List tbvkind_data(MvlistVO vo) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.tbvkind_data", vo);
	}
	//분류기준수립 데이터(tbtkind) 생성 팝업 리스트
	@Override
	public MvlistVO tbvkind_InsertData(MvlistVO vo) throws SQLException {
		return (MvlistVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.tbvkind_InsertData", vo);
	}
	//tbpublic 의 base_lev1 like 함수
	@Override
	public List tbpublicVLData(TbPublicVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.tbpublicVLData",vo);
	}
	//취약성식별 수정 페이지로 이동
	@Override
	public MvlistVO mvlist_updatePage(MvlistVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MvlistVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mvlist_updatePage", vo);
	}
	//취약성식별 수정
	@Override
	public void mvlist_update(MvlistVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mvlist_update", vo);
	}
	//최대 순번 구해오기
	@Override
	public Integer mvlist_maxNo(int pro_id) throws SQLException {
		return (Integer) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mvlist_maxNo",pro_id);
	}
	//취약성식별 등록
	@Override
	public void mvlist_insert(MvlistVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mvlist_insert", vo);
	}
	//취약성식별 삭제
	@Override
	public void mvlist_delete(MvlistVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.mvlist_delete", vo);
	}
	//취약성 식별 등록 조회 구분 1
	@Override
	public List mvlistDistinct1() throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mvlistDistinct1");
	}
	//취약성 식별 등록 조회 구분 2
	@Override
	public List mvlistDistinct2(MvlistVO vo) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mvlistDistinct2", vo);
	}
	//취약성 식별 등록 조회 구분 3
	@Override
	public List mvlistDistinct3(MvlistVO vo) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mvlistDistinct3", vo);
	}
	
	
	//[취약성평가]
	//(취약성평가)
	//취약성평가 페이지로 이동
	@Override
	public List mvlistp(int pro_id) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mvlistp",pro_id);
	}
	//자산식별된 자산유형목록
	@Override
	public List<String> assetListSelectByMraasset(int pro_id) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.assetListSelectByMraasset",pro_id);
	}
	//취약성평가 등록 페이지
	@Override
	public List mvlistp_insertPage(MvlistVO vo) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mvlistp_insertPage",vo);
	}
	//취약성평가 등록
	@Override
	public void mvlistp_insert(MvlistVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mvlistp_insert", vo);
	}
	//취약성평가 삭제
	@Override
	public void mvlistp_delete(MvlistVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.mvlistp_delete", vo);
	}
	//취약성평가 수정 페이지로 이동
	@Override
	public MvlistVO mvlistp_updatePage(MvlistVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MvlistVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mvlistp_updatePage", vo);
	}
	//취약성평가 수정
	@Override
	public void mvlistp_update(MvlistVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mvlistp_update", vo);
	}
	// 취약성 평가된 식별 숫자(count)
	@Override
	public Map tvchecklistCount(int pro_id) throws SQLException {
		// TODO Auto-generated method stub
		return (Map) super.getSqlMapClientTemplate().queryForObject("riskI.tvchecklistCount",pro_id);
	}
	

	//(자산공통 취약성 평가)
	//자산공통 취약성 평가 페이지로 이동
	@Override
	public List mavlistp(Map map) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mavlistp", map);
	}
	//연관자산
	@Override
	public List v_raitem_select(MvlistVO vo) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.v_raitem_select",vo);
	}
	//자산공통 취약성 평가 삭제
	@Override
	public void mavlistp_delete(MvlistVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.mavlistp_delete", vo);
	}
	//자산공통 취약성 평가 수정 페이지로 이동
	@Override
	public MvlistVO mavlistp_updatePage(MvlistVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MvlistVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mavlistp_updatePage", vo);
	}
	//자산공통 취약성 평가 수정
	@Override
	public void mavlistp_update(MvlistVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mavlistp_update", vo);
	}
	//자산공통 취약성 평가 등록
	@Override
	public void mavlistp_insert(int pro_id) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mavlistp_insert", pro_id);
	}
	
	
	
	//[위험시나리오]
	//(위험시나리오)
	//위험시나리오 페이지로 이동
	@Override
	public List mridenty(Map map) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mridenty",map);
	}
	//위험시나리오 페이지로 이동(조회)
	@Override
	public List mridentySearch(Map map) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mridentySearch", map);
	}
	//위험시나리오 생성
	/*
	@Override
	public List makeRiskScenario(RiskScenarioVO vo) throws SQLException {
		/*
		HashMap map=new HashMap();
		map.put("pro_id",vo.getPro_id());
		map.put("ascu_id",vo.getAscu_id());
		map.put("asc_id",vo.getAsc_id());
		//한페이지당 보여질 게시물 수
		map.put("tNum",util.CommonConstants.CONTENT_NUMBER_PER_PAGE);
		map.put("pNum",1);
		*/
	/*
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.makeRiskScenario",vo);
	}
	*/
	//위험시나리오 생성
	@Override
	public List makeRiskScenario(Map map) throws SQLException {
		System.out.println(super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.makeRiskScenario", map));
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.makeRiskScenario", map);
	}
	//위험시나리오 생성(리스트 count)
	public Integer totalmakeRiskScenario(Map map) throws SQLException{
		return (Integer) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.totalmakeRiskScenario", map);
	}
	//위험시나리오  데이터 받아오기
	@Override
	public MridentyVO makeRiskScenarioData(RiskScenarioVO vo) throws SQLException {
		return (MridentyVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.makeRiskScenarioData",vo);
	}
	//시나리오 카운터 수
	@Override
	public Integer scenarioCount(RiskScenarioVO vo) throws SQLException {
		return (Integer) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.scenarioCount",vo);
	}
	//위험식별시나리오 등록
	@Override
	//public void mridenty_insert(MridentyVO vo) throws SQLException {
	public void mridenty_insert(Map map) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.mridenty_insert", map);
	}
	public void mridenty_insertTest(int pro_id, int ascu_id, int asc_id, String[] hiddenCode) throws SQLException{
		super.getSqlMapClientTemplate().getSqlMapClient().startTransaction();
			super.getSqlMapClientTemplate().getSqlMapClient().startBatch();
				for(int i=0;i<hiddenCode.length;i++){
					HashMap map=new HashMap();
					map.put("pro_id",pro_id);
					map.put("ascu_id",ascu_id);
					map.put("asc_id",asc_id);
					map.put("hiddenCode",hiddenCode[i]);
					super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.mridenty_insert", map);
				}
			super.getSqlMapClientTemplate().getSqlMapClient().executeBatch();
		super.getSqlMapClientTemplate().getSqlMapClient().commitTransaction();
	}
	//risk_id 구하기
	@Override
	public String mridenty_max_risk_id(MridentyVO vo) throws SQLException {
		return (String) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mridenty_max_risk_id",vo);
	}
	
	//최대 순번 구해오기
	@Override
	public Integer mridenty_maxNo(int pro_id) throws SQLException {
		return (Integer) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mridenty_maxNo",pro_id);
	}
	//위험식별시나리오 삭제
	@Override
	public void mridenty_delete(MridentyVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.mridenty_delete", vo);
		//계산 컨테이너 두개 같이 삭제
		//super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.triskcalc_delete", vo);
		//super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.triskcalc2_delete", vo);
	}
	//위험식별시나리오 수정 페이지로 이동
	@Override
	public MridentyVO mridenty_updatePage(MridentyVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MridentyVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mridenty_updatePage", vo);
	}
	//위협내용
	@Override
	public MtlistVO mtlistData(MtlistVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MtlistVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mtlistData", vo);
	}
	//위험식별시나리오 수정
	@Override
	public void mridenty_update(MridentyVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mridenty_update", vo);
	}
	//자산 연관정보 갯수
	@Override
	public Integer mraassetCount(MraassetVO vo) throws SQLException {
		return (Integer) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mraassetCount",vo);
	}
	//위험시나리오 ciamemo
	@Override
	public MraassetVO riskScenarioMemo(MraassetVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MraassetVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.riskScenarioMemo", vo);
	}
	
	
	//[보안통제효과성평가]
	//(보안통제효과성평가) 
	//보안통제효과성평가 페이지로 이동
	@Override
	public List mbbtlist(Map map) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mbbtlist", map);
	}
	//보안통제효과성평가 수정
	@Override
	public void mbbtlist_update(MvlistVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mbbtlist_update", vo);
	}
	
	
	//[위험 수준 산정 및 평가]
	//(취약성점수 산정기준)
	//취약성점수 산정기준 페이지로 이동
	@Override
	public List mvscore(int pro_id) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mvscore",pro_id);
	}
	@Override
	public List mvscoreDesc(int pro_id) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mvscoreDesc",pro_id);
	}
	//최대 순번 구해오기
	@Override
	public Integer mvscore_maxNo(int pro_id) throws SQLException {
		return (Integer) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mvscore_maxNo",pro_id);
	}
	//취약성점수 산정기준 등록
	@Override
	public void mvscore_insert(MvscoreVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.mvscore_insert", vo);
	}
	//취약성점수 산정기준 삭제
	@Override
	public void mvscore_delete(MvscoreVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.mvscore_delete", vo);
	}
	//취약성점수 산정기준 수정 페이지로 이동
	@Override
	public MvscoreVO mvscore_updatePage(MvscoreVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MvscoreVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mvscore_updatePage", vo);
	}
	//취약성점수 산정기준 수정
	@Override
	public void mvscore_update(MvscoreVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mvscore_update", vo);
	}
	
	
	//(위험등급 결정기준)
	//DoA 기준 점수 호출
	public List tdoa(int pro_id) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.tdoa",pro_id);
	}
	//DoA 기준 점수 호출(base)
	public List tdoa_base() throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.tdoa_base");
	}
	//위험등급 결정기준 등록
	@Override
	public void mrlevel_insert(TbPublicVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mrlevel_insert", vo);
	}
	//위험등급 결정 기준(DoA) 등록
	@Override
	public void DoA_insert(TdoaVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.DoA_insert", vo);
	}
	
	//(위험수준산정)
	//위험수준산정 페이지로 이동
	@Override
	public List mrscore(Map map) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mrscore", map);
	}
	//위험수준산정 수정 페이지로 이동
	@Override
	public MridentyVO mrscore_updatePage(MridentyVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (MridentyVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mrscore_updatePage", vo);
	}
	//취약성 식별 관련
	@Override
	public TbPublicVO tbpublicDataVlLevel(int base_lev1) throws SQLException{
		return (TbPublicVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.tbpublicDataVlLevel", base_lev1);
	}
	//위험수준산정 등록
	@Override
	public void mrscore_insert(TtriskcalcVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.mrscore_insert", vo);
	}
	//위험수준산정 등록(con2)
	@Override
	public void mrscore_insert1(TtriskcalcVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.mrscore_insert1", vo);
	}
	//위험수준산정 계산 컨테이너 vo값
	@Override
	public TtriskcalcVO mrscore_updatePageCal(TtriskcalcVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (TtriskcalcVO) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mrscore_updatePageCal", vo);
	}
	//위험수준산정 계산 컨테이너 vo값 수정
	@Override
	public void mrscore_update(TtriskcalcVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mrscore_update", vo);
	}
	//위험수준산정 계산 컨테이너 vo값 수정(con2)
	@Override
	public void mrscore_update1(TtriskcalcVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mrscore_update1", vo);
	}
	
	
	//[위험처리계획수립]
	//(위험처리방안선정)
	//위험처리방안선정 페이지로 이동
	@Override
	public List mridenty3(Map map) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mridenty3", map);
	}
	//위험처리방안선정 triskplan table값
	@Override
	public Map mridenty3_updatePage(TriskplanVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (Map) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mridenty3_updatePage", vo);
	}
	//위험처리방안선정 등록
	@Override
	public void mridenty3_insert(TriskplanVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.mridenty3_insert", vo);
	}
	//위험처리방안선정 계산 컨테이너 vo값 수정
	@Override
	public void mridenty3_update(TriskplanVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mridenty3_update", vo);
	}
	
	
	
	
	//(자산위협매트릭스)
	//자산위협매트릭스 페이지로 이동
	@Override
	public List atmetrix(int pro_id, Map map) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.atmetrix", map);
	}
	//자산위협매트릭스 등록
	@Override
	public void insertAtmetrix(Map map) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.insertAtmetrix", map);
	}
	//자산위협매트릭스 삭제
	@Override
	public void deleteAtmetrix(Map map) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.deleteAtmetrix", map);
	}
	
	//(자산위협매트릭스)
	//자산위협매트릭스 페이지로 이동
	//RiskIjdbcDAOImpl에서 읽음
	
	//자산위협매트릭스 등록
	@Override
	public void insertTvmetrix(Map map) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.insertTvmetrix", map);
	}
	//자산위협매트릭스 삭제
	@Override
	public void deleteTvmetrix(Map map) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.deleteTvmetrix", map);
	}
	
	
	
	//[위험수용]
	//(잔여위험평가)
	//잔여위험평가 페이지로 이동
	@Override
	public List mridenty4(Map map) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mridenty4", map);
	}
	//잔여위험평가 trerisk table값
	@Override
	public Map mridenty4_updatePage(TreriskVO vo) throws SQLException {
		// TODO Auto-generated method stub
		return (Map) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.mridenty4_updatePage", vo);
	}
	//잔여위험평가 등록
	@Override
	public void mridenty4_insert(TreriskVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.mridenty4_insert", vo);
	}
	//잔여위험평가 수정
	@Override
	public void mridenty4_update(TreriskVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.mridenty4_update", vo);
	}
	
	
	
	
	//[SoA정립]
	//(SoA정립)
	//SoA정립 페이지로 이동
	@Override
	public List msoa(int pro_id) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.msoa",pro_id);
	}
	//tsoa 데이터 확인용
	@Override
	public List tsoaData(Map map) throws SQLException {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.tsoaData", map);
	}
	//SoA정립 등록페이지로 이동
	@Override
	public Map msoa_insertPage(Map map) throws SQLException {
		// TODO Auto-generated method stub
		return (Map) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.msoa_insertPage", map);
	}
	//SoA정립 수정페이지로 이동
	@Override
	public Map msoa_updatePage(Map map) throws SQLException {
		// TODO Auto-generated method stub
		return (Map) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.msoa_updatePage", map);
	}
	//SoA정립 등록
	@Override
	public void msoa_insert(MsoaVO vo) throws SQLException {
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.msoa_insert", vo);
	}
	//SoA정립 수정
	@Override
	public void msoa_update(MsoaVO vo) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().update("riskI.msoa_update", vo);
	}
	//SoA정립 삭제
	@Override
	public void msoa_delete(Map map) throws SQLException {
		// TODO Auto-generated method stub
		super.getSqlMapClientTemplate().getSqlMapClient().delete("riskI.msoa_delete", map);
	}
	//SoA정립 list페이지에서 insert
	@Override
	public void msoa_SL_insert(Map map) throws SQLException {
		System.out.println("map값"+map);
		super.getSqlMapClientTemplate().getSqlMapClient().insert("riskI.msoa_SL_insert", map);
	}
	
	//[현황관리]
	//지역/사이트
	@Override
	public List siteList(int pro_id) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.siteList",pro_id);
	}
	//프로세스
	@Override
	public List procList(int pro_id) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.procList",pro_id);
	}
	//보안 통제 영역 값
	@Override
	public List ts_nm2List(int pro_id) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.ts_nm2List",pro_id);
	}
	//보안 통제 항목 값
	@Override
	public List ts_nm3List(Map map) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.ts_nm3List", map);
	}
	
	
	
	//현황 조회 
	@Override
	public List stateReportResult(StateReportVO vo) throws SQLException {
		String QueryName="riskI.stateReportResult";
		int searchCondition=vo.getSearchCondition();
		//if(searchCondition==1){
		//	QueryName=QueryName+"1";
		//}else if(searchCondition==2){
			QueryName=QueryName+searchCondition;
			System.out.println(QueryName);
		//}
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList(QueryName,vo);
	}
	
	
	
	//엑셀 관련
	@Override
	public List excelData(Map map,String pageName) throws SQLException {
		List list=null;
		if(pageName.equals("mridenty")){
			list=super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mridentyExcelData",map);
		}else if(pageName.equals("mrscore")){
			list=super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mrscoreExcelData",map);
		}else if(pageName.equals("mridenty3")){
			list=super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mridenty3ExcelData",map);
		}else if(pageName.equals("mridenty4")){
			list=super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.mridenty4ExcelData",map);
		}else if(pageName.equals("msoa")){
			list=super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.msoaExcelData",map);
		}
		return list;
	}
	
	
	//컨테이너 클릭 이벤트
	public boolean tracont2Flag(Map map) throws SQLException{
		boolean flag=false;
		String str=(String) super.getSqlMapClientTemplate().getSqlMapClient().queryForObject("riskI.tracont2Flag", map);
		if(str!=null){
			flag=true;
		}
		return flag;
	}
	@Override
	public List rainfoIDSelect(Map map) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.rainfoIDSelect", map);
	}
	// 컨테이너에 컨테이너 유무 조회
	@Override
	public List contSearch(Map map) throws SQLException {
		return super.getSqlMapClientTemplate().getSqlMapClient().queryForList("riskI.contSearch", map);
	}
}
